package com.example.demosblogging.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author : niu niu
 * @version : 1.0.0
 * @date : 2023/4/15 16:11
 */
@ResponseBody
// 页面访问必须在controller层
@Controller
//使用lombok的Slf4j注解方便的使用log对象
@Slf4j
public class UserService {

    @RequestMapping("/saylog2")
    public void sayLog2(){
        log.trace("这是 trace");
        log.debug("这是 debug");
        log.info("这是 info");
        log.warn("这是 warn");
        log.error("这是error");
    }
}
